<?php

class Tramo extends AppModel {

    var $name = 'Tramo';
    var $displayField = 'id';
    var $validate = array(
        'id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'luz_parcial' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'obra_id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
    );
    //The Associations below have been created with all possible keys, those that are not needed can be removed
    var $belongsTo = array(
        'Obra' => array(
            'className' => 'Obra',
            'foreignKey' => 'obra_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );
}
?>